package org.ladybug.dao;

import org.springframework.orm.hibernate3.HibernateTransactionManager;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.support.DefaultTransactionStatus;

public class LadybugHibernateTransactionManager extends
		HibernateTransactionManager {

	@Override
	protected void doBegin(Object transaction, TransactionDefinition definition) {
		System.out.println("LadybugHibernateTransactionManager.doBegin() "+transaction);
		super.doBegin(transaction, definition);
	}

	@Override
	protected void doCleanupAfterCompletion(Object transaction) {
		System.out
				.println("LadybugHibernateTransactionManager.doCleanupAfterCompletion()");
		super.doCleanupAfterCompletion(transaction);
	}

	@Override
	protected void doCommit(DefaultTransactionStatus status) {
		System.out.println("LadybugHibernateTransactionManager.doCommit()");
		super.doCommit(status);
	}

	@Override
	protected Object doGetTransaction() {
		System.out
				.println("LadybugHibernateTransactionManager.doGetTransaction()");
		return super.doGetTransaction();
	}

	@Override
	protected void doResume(Object transaction, Object suspendedResources) {
		System.out.println("LadybugHibernateTransactionManager.doResume()");
		super.doResume(transaction, suspendedResources);
	}

	@Override
	protected void doRollback(DefaultTransactionStatus status) {
		System.out.println("LadybugHibernateTransactionManager.doRollback()");
		super.doRollback(status);
	}

	@Override
	protected void doSetRollbackOnly(DefaultTransactionStatus status) {
		System.out
				.println("LadybugHibernateTransactionManager.doSetRollbackOnly()");
		super.doSetRollbackOnly(status);
	}

	@Override
	protected Object doSuspend(Object transaction) {
		System.out.println("LadybugHibernateTransactionManager.doSuspend()");
		return super.doSuspend(transaction);
	}

}
